package com.example.demo.controller;

import com.example.demo.model.DataSourceQueryDto;
import com.example.demo.model.DataSourceRespDto;
import com.example.demo.service.DatasourceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/datasource")
public class DatasourceController {

    @Autowired
    private DatasourceService datasourceService;

    /**
     * @return
     */
    @RequestMapping("/getSourceList")
    public List<DataSourceRespDto> getSourceList(DataSourceQueryDto dataSourceQueryDto) {
        return datasourceService.getSourceList(dataSourceQueryDto);
    }
}
